<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/jsp/common/page_init.jsp"%>
<%
	JSONObject result = (JSONObject)request.getAttribute("result");
	int ifs_nodeCount = result.getIntValue("ifs_nodeCount");
	int esb_nodeCount = result.getIntValue("esb_nodeCount");
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%=CommonConfig.getString("SYSTEM_TITLE")%></title>
<script src="<%=contextPath%>/js/common/plug-in/highCharts/highcharts.js"></script>
<script type="text/javascript" src="<%=contextPath%>/js/console/monitor/monitorIndex.js?uuid=<%=RANDOM%>"></script>
<script type="text/javascript">
		
    </script>
</head>
<body>
<div class="new-sybg">
  <div class="first-portion">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td valign="top"><div class="clear">
            <div class="r ptyj-module">
              <div class="ptsy-title">平台预警</div>
              <p class="ptyj-ico tc"><i class="icon ico-icoyj warn"></i></p>
              <p class="jkjc-result tc"><span><font>0</font>预警信息</span></p>
              <p class="jkjc-history tr"><a>查看历史预警</a></p>
            </div>
            <div class="jkjc-module clear">
              <div class="l"><img src="<%=contextPath %>/images/console/jkls.gif" width="176" height="186" class="jkjcpic" /></div>
              <div class="r jkjc-info">
                <div class="jkjc-info-mr">
                <p class="jkjc-title">平台监控检测</p>
                <p class="fs12 tc grey">(系统会自动检测所有接口是否正常)</p>
                <p class="jkjc-result tc"><span>检测<font class="warn">0</font>异常</span></p>
                </div>
                <p class="jkjc-history tr"><a>查看历史异常</a></p>
              </div>
            </div>
          </div></td>
        <td width="16"></td>
        <td valign="top"><div class="clear">
            <div class="redis-module ml8 r clear"><a >
              <div class="ptsy-title">redis</div>
              <span class="ptzt-pic"><img id="redisStatusPoint" redisIp="" redisPort="" src="<%=contextPath %>/images/console/gray-pic.png" width="14" height="14" /></span></a> </div>
            <div class="sjk-module mr8 r clear"><a>
              <div class="ptsy-title">数据库</div>
              <span class="ptzt-pic"><img id="mysqlStatusPoint" dbUrl="" dbUser="" dbPassword="" src="<%=contextPath %>/images/console/gray-pic.png" width="14" height="14" /></span></a> </div>
            <div class="tyjr-module clear">
              <div class="ptsy-title">统一接入</div>
              <div class="l" id="uaNodeContainer">
              <%--
              <a class="tyjrjd-item"><span class="ptzt-pic"><img src="<%=contextPath %>/images/console/gray-pic.png" width="14" height="14" /></span><br />
                <span class="tyjrjd-ll"><font>232</font>次</span></a>
                <a class="tyjrjd-item"><span class="ptzt-pic"><img src="<%=contextPath %>/images/console/green-pic.png" width="14" height="14" /></span><br />
                <span class="tyjrjd-ll"><font>2342</font>次</span></a>
               --%>
              </div>
            </div>
          </div>
          <div class="esbjq-module">
            <div class="ptsy-title">ESB 集群</div>
            <div class="ml10">
            	<%if(esb_nodeCount>0){
            		JSONArray esb_records = result.getJSONArray("esb_records");
            		for(int i = 0;i<esb_records.size();i++){
            			JSONObject row = esb_records.getJSONObject(i);
            			String imgSrc = "/images/console/gray-pic.png";
            			//if(!row.getBooleanValue("running")) imgSrc = "/images/console/orange-pic.png";
            	%>
            	<a class="tyjrjd-item" name="nodePoint" 
            		id="esb_<%=row.getString("nodeId") %>" 
            		nodeId="<%=row.getString("nodeId") %>" 
            		nodeType="<%=row.getString("nodeType") %>" 
            		remark="" 
            		netIp="<%=row.getString("netIp") %>" 
            		nodeName="<%=row.getString("nodeName") %>" >
            		<span class="ptzt-pic"><img id="img_<%=row.getString("nodeId") %>" src="<%=contextPath+imgSrc %>" width="14" height="14" /></span>
            	</a>
            	<%	}
            	} %>
            </div>
          </div>
          <div class="fsdpjq-module">
            <div class="ptsy-title">FSDP 集群</div>
            <div class="ml10">
            	<%if(ifs_nodeCount>0){
            		JSONArray ifs_records = result.getJSONArray("ifs_records");
            		for(int i = 0;i<ifs_records.size();i++){
            			JSONObject row = ifs_records.getJSONObject(i);
            			String imgSrc = "/images/console/gray-pic.png";
            			//if(!row.getBooleanValue("running")) imgSrc = "/images/console/orange-pic.png";
            	%>
            	<a class="tyjrjd-item" name="nodePoint" 
            		id="ifs_<%=row.getString("nodeId") %>" 
            		nodeId="<%=row.getString("nodeId") %>" 
            		nodeType="<%=row.getString("nodeType") %>" 
            		remark="" 
            		netIp="<%=row.getString("netIp") %>" 
            		nodeName="<%=row.getString("nodeName") %>" >
            		<span class="ptzt-pic"><img id="img_<%=row.getString("nodeId") %>" src="<%=contextPath+imgSrc %>" width="14" height="14" /></span>
            	</a>
            	<%	}
            	} %>
            </div>
          </div></td>
      </tr>
    </table>
  </div>
  <div class="second-portion">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td valign="top"><div class="tj-module" id="serviceCountArea"><a><i class="icon ico-icodrll"></i><span>当日流量<font id="flowDayCount">0</font>笔</span></a></div></td>
        <td width="16">&nbsp;</td>
        <td valign="top"><div class="tj-module"><a><i class="icon ico-icobfl"></i><span>并发量<font>4567</font>次</span></a></div></td>
        <td width="16">&nbsp;</td>
        <td valign="top"><div class="tj-module"><a><i class="icon ico-icopjxysj"></i><span>平均响应时间<font>47</font>ms</span></a></div></td>
        <td width="16">&nbsp;</td>
        <td valign="top"><div class="tj-module" id="onlineUserArea"><a><i class="icon ico-icozxyh"></i><span>在线用户<font id="onlineUserCount">0</font>个</span></a></div></td>
      </tr>
    </table>
  </div>
  <div class="three-portion">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td valign="top"><div class="tjtb-module">
            <p class="tc pt10 mb10">平均相应时间</p>
            <img src="<%=contextPath %>/images/console/tjta_pic.png" /></div></td>
        <td width="16">&nbsp;</td>
        <td valign="top"><div class="tjtb-module" id="container_flowCount_day">
            <p class="tc pt10 mb10">当天流量</p>
            <img src="<%=contextPath %>/images/console/tjtb_pic.png" /></div></td>
        <td width="16">&nbsp;</td>
        <td valign="top"><div class="tjtb-module" id="container_userFlow_day">
            <p class="tc pt10 mb10">用户流量</p>
            <img src="<%=contextPath %>/images/console/tjtc_pic.png" /></div></td>
      </tr>
    </table>
  </div>
</div>
</body>
</html>